﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Framework;
using Com.Framework.Data;
using Com.Library.DB.Advertise;

namespace Com.Web.coffinegurunaru.aboutus
{
	public partial class ad_etc : WebPage
	{
		public int PageNo
		{
			get;
			set;
		}

		public byte PageSize
		{
			get { return 8; }
		}

		public List<AdvertiseEntity> AdvertiseList
		{
			get;
			set;
		}

		protected void Page_Load(object sender, EventArgs e)
		{
			this.LeftMenuType = 3;

			PageNo = Request.QueryString["PageNo"].Parse(1);
			ListData<AdvertiseEntity, OutputEntity> result = AdvertiseModel.GetList(4, PageNo, PageSize);
			AdvertiseList = result.Record;

			UC_Paging.TotalCount = result.Output.CntTotal;
			UC_Paging.PageName = "PageNo";
			UC_Paging.PageNo = PageNo;
			UC_Paging.PageSize = PageSize;
		}

		public string GetViewURL(int AdvertiseNo)
		{
			return "/aboutus/etc_view.aspx?PageNo=" + this.PageNo.ToString() + "&AdvertiseNo=" + AdvertiseNo.ToString();
		}
	}
}
